<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <title>消息中心</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1" name="viewport" />
    <link href="css/dropload.css" rel="stylesheet" type="text/css" />
    <link href="css/base.css" rel="stylesheet" type="text/css" />
    <link href="css/button.css" rel="stylesheet" type="text/css" />
    <link href="css/icon.css" rel="stylesheet" type="text/css" />
    <link href="css/message.css" rel="stylesheet" type="text/css" />
</head>

<body>
    <div class="banner">
        <img src="image/index-banner-1.png" />
    </div>
    <div class="content-container">
        <div id="list-dom"></div>
    </div>
    <script id="list" type="text/html">
        {{each list}}
        <div class="comment-item">
            <div class="comment-image">
                <div class="avatar-container">
                    <img src="image/default-avatar.png" class="avatar-thumb" />
                    <div class="avatar-mask"></div>
                </div>
            </div>
            <div class="comment-info">
                <strong>{{ $value.title }}</strong>
                <span class="datetime">{{ $value.create_time }}</span>
                <p class="sub-title">{{ $value.content }}</p>
            </div>
            <div class="clear-fix divider"></div>
        </div>
        {{/each}}
    </script>
    <div class="footer-padding"></div>
    <ul class="bottom-bar">
        <li class="bottom-bar-item">
            <a href="index.html">
                <i class="icon icon-home"></i>
                <span class="item-title">小家</span>
            </a>
        </li>
        <li class="bottom-bar-item">
            <a class="active" href="javascript:;">
                <i class="icon icon-message"></i>
                <span class="item-title">消息</span>
            </a>
        </li>
        <li class="bottom-bar-item">
            <a href="person.html">
                <i class="icon icon-person"></i>
                <span class="item-title">Honey</span>
            </a>
        </li>
    </ul>
    <script src="js/jquery.min.js" type="text/javascript"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js" type="text/javascript"></script>
    <script src="js/dropload.min.js" type="text/javascript"></script>
    <script src="js/template.js" type="text/javascript"></script>
    <script src="js/base.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function() {
            bee.wxConfig(function() {
                bee.hideAllNonBaseMenuItem();
            }, function(res) {});

            // 页数
            var page = 0;
            // 每页展示5个
            var limit = 5;
            // 房源列表下拉加载更多
            $('.content-container').dropload({
                scrollArea: window,
                loadDownFn: function(me) {
                    page++;

                    bee.request({
                        url: '/Member/Index/member_msg_list',
                        data: {
                            page: page,
                            limit: limit,
                        },
                        success: function(result) {
                            if (result.list.length) {
                                bee.template('list', result);
                            } else {
                                me.lock();
                                me.noData();
                            }
                            me.resetload();
                        }
                    });
                }
            });
        });
    </script>
</body>

</html>
